import request from '@/utils/request'

const api_name = '/admin/vod/teacher'

export default {
  // 讲师列表
  pageList(page, limit, searchObj) {
    return request({
      url: `${api_name}/${page}/${limit}`,
      method: `POST`,
      data: searchObj
    })
  },
  // 删除讲师
  removeById(id) {
    return request({
      url: `${api_name}/remove/${id}`,
      method: `delete`
    })
  },
  // 新增讲师
  addTeacher(teacher) {
    return request({
      url: `${api_name}/save`,
      method: `post`,
      data: teacher
    })
  },
  // 获取讲师信息
  getTeacherInfo(id) {
    return request({
      url: `${api_name}/get/${id}`,
      method: `get`
    })
  },
  // 更新讲师信息
  updateByid(teacher) {
    return request({
      url: `${api_name}/update`,
      method: 'put',
      data: teacher
    })
  },
  // 批量删除
  batchRemove1(idList) {
    return request({
      url: `${api_name}/batchRemove`,
      method: `delete`,
      data:
        idList
    })
  }
}

